package com.github.cyf.entity;

import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @author chenyifan
 * @create 2024-05-07 21:53
 */
@Data
public class Teacher {

    @NotBlank(message = "老师姓名不能为空")
    private String teacherName;

    @NotNull(message = "学生列表不能为空")
    @Size(min = 1, message = "最少有一个老师")
    @Valid
    private List<Student> studentList;
}
